package cn.amaake.common.config;

import com.jfinal.config.Routes;

import cn.amaake.controller.ClassController;
import cn.amaake.controller.CourseController;
import cn.amaake.controller.LoginController;
import cn.amaake.controller.MenuController;
import cn.amaake.controller.ResultController;
import cn.amaake.controller.RoleController;
import cn.amaake.controller.StudentController;
import cn.amaake.controller.UserController;
import cn.amaake.controller.WebController;
import cn.amaake.interceptor.LoginInterceptor;

public class AdminRoutes extends Routes {

	@Override
	public void config() {
		//针对一组路由配置baseViewPath
		//this.setBaseViewPath("/_view/_admin");
		//针对一组路由配置单独的拦截器
		addInterceptor(new LoginInterceptor());
		//针对后台管理系统配置路由+controller
		//this.add("/admin", AdminIndexController.class,"/index");
		add("/admin", WebController.class);
		add("/login", LoginController.class);
		add("/menu", MenuController.class);
		add("/role", RoleController.class);
		add("/user", UserController.class);
		add("/class",ClassController.class);
		add("/student",StudentController.class);
		add("/course",CourseController.class);
		add("/result",ResultController.class);
	}

}